Image denoising method

ABSTRACT

An image denoising method according to the present invention includes the steps of: sequentially selecting a pixel in an image as a current pixel; dynamically determining a current search block and a strength parameter; transferring the comparison block of each pixel in the current search block to a frequency domain; determining a current frequency basis; obtaining a similarity between each neighborhood pixel and the current pixel in the current search block according to the current frequency basis; determining a weighting of each neighborhood pixel related to the current pixel according to the strength parameter, and a distance and the current pixel in the current search block; and weighted averaging each neighborhood pixel and the current pixel in the current search block according to the weighting so as to obtain a reconstruction value of the current pixel.

CROSS REFERENCE TO RELATED APPLICATION

This application claims the priority benefit of Taiwan PatentApplication Serial Number 098131742 filed Sep. 21, 2009, the fulldisclosure of which is incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an image processing method, and moreparticularly, to an image denoising method.

2. Description of the Related Art

Image noise is one of critical issues to the quality of an image.However, when the pixel number of an image sensor is increased, the sizeof a pixel is gradually reduced under the consideration of cost. Thiscauses the noise in the images captured by the image sensor to beamplified inevitably. Therefore, the performance of denoising willgradually be a critical factor in determining the quality of an image.

The method of reconstructing a noisy image to be a denoised image by afilter is named as image reconstruction. FIG. 1 illustrates a noisyimage and a denoised image reconstructed from the noisy image. It willbe understood that the image reconstruction can be carried out through aprocessing unit. In general, the processing unit is coupled to a storingunit, which is configured to temporarily store the information arisen inthe course of image reconstruction.

Using a neighborhood filter to carry out the image reconstruction is oneof the standard techniques. The neighborhood filter determines aweighting according to a similarity between a current pixel and theneighborhood pixels thereof. Afterward, a reconstruction value of thecurrent pixel is obtained by weighted averaging the current pixel andthe neighborhood pixels according to the weighting. When all pixels inthe noisy image are subjected to the above image reconstruction, adenoised image is obtained. Such a neighborhood filter can be expressedas:

$\begin{matrix}{{\hat{U}(x)} = {\frac{1}{N_{h}(x)}\underset{R_{x}}{\int\int}{h\left( {x,y} \right)}{U(y)}{y}}} & (1)\end{matrix}$

where U is the noisy image, Nh(x) is the normalization constant, Û isthe reconstructed image and R_(x) is a local neighborhood associated tox. The filtering function h is a monotonically decreasing and depends onthe photometric distance between the pixel x and its neighborhood pixely, for example, on the distance and intensity difference between thecurrent pixel x and the neighborhood pixel y. Referring to FIG. 2, itillustrates a 7×7 neighborhood filtering. An image sensor captures animage I, which is a noisy image. A neighborhood filter will obtainforty-eight (48) weightings according to similarities between a currentpixel x and its 48 neighborhood pixels y within the search block R_(x)around the current pixel x. Afterward, the reconstruction value of thecurrent pixel x is obtained by weighted averaging the gray level of thecurrent pixel x and the gray levels of the 48 neighborhood pixels yaccording to the weightings. However, the above reconstruction value isobtained by the neighborhood filter according to only the weightedaverage of the similarities between the pixels. The reconstructionresult is always unsatisfactory.

Therefore, a so-called non-local algorithm is submitted to improve theabove image reconstruction method. The non-local algorithm is first todetermine a weighting according to the similarity between apredetermined-sized current pixel comparison block around a currentpixel and a predetermined-sized neighborhood pixel comparison blockaround one of its neighborhood pixels. The non-local algorithm thenobtains the reconstruction value of the current pixel by weightedaveraging the gray level of the current pixel and the gray levels of theneighborhood pixels according the weighting. Such non-local algorithmcan be expressed as:

$\begin{matrix}{{{{NL}\lbrack v\rbrack}(i)} = {\sum\limits_{j \in R_{x}}{{\omega \left( {i,j} \right)}{v(j)}}}} & (2)\end{matrix}$

where NL[v](i) is the reconstruction value of a current pixel i, v(j) isthe gray level of one of its neighborhood pixels j before denoised,ω(i,j) is a weighting of the current pixel i and neighborhood pixel j,which determines the similarity between the predetermined-sized currentpixel comparison block around the current pixel i and thepredetermined-sized neighborhood pixel comparison block around aneighborhood pixel j. The weighting can be expressed as:

$\begin{matrix}{{\omega \left( {i,j} \right)} = {\frac{1}{Z()}^{- \frac{{{{v{(N_{i})}} - {v{(N_{j})}}}}_{2,a}^{2}}{h^{2}}}}} & (3)\end{matrix}$

where ∥v(N_(i))−v(N_(j))|_(2,a) ² is the square of the differencebetween the gray levels of the predetermined-sized current pixelcomparison block around the current pixel i and the predetermined-sizedneighborhood pixel comparison block around a neighborhood pixel j, andZ(i) is the normalization constant.

Referring to FIG. 3, it illustrates the non-local algorithm that use a7×7 search block Rx and a 5×5 comparison block (Ni, Nj), where the imageI is a noisy image captured by an image sensor, i is a current pixel, Niis the predetermined-sized (5×5) current pixel comparison block aroundthe current pixel i, j is a neighborhood pixel of the current pixel i,Nj is the predetermined-sized neighborhood pixel comparison block aroundthe neighborhood pixel j, and Rx is a search block. According to FIG. 3,the weighting between a current pixel i and a neighborhood pixel jdepends on the sum of the squares of the twenty-five (25) differencesbetween the pixels in the current pixel comparison block Ni and thecorresponding pixels in the neighborhood pixel comparison block Nj.Therefore, forty-eight (48) weightings associated to the search block Rxcan be obtained. The reconstruction value of the current pixel i isobtained by weighted averaging the gray levels of the current pixel iand neighborhood pixel j according to the weightings.

In comparison with the neighborhood filtering, the non-local algorithmcan be used to obtain satisfied denoising images. However, since thenoise can influence the pixels, the non-local algorithm of directlycomputing the gray levels for two comparison blocks can still not removeall noise in the reconstructed image. In order to improve the abovenon-local algorithm, the algorithm is slightly modified that thecomparison block is first transformed to frequency domain and then thecomparison is executed. This is because the noise commonly has dominanthigh-frequency components in frequency domain. Therefore, the noise canbe easily filtered out in frequency-domain before the comparison isexecuted. However, the above method cannot dynamically adjust relatedparameters for the characteristics of each pixel. This will lead to poorresult of details and being very subject to shock effect or staircastingeffect.

The above image reconstruction methods can be referred to the CVPR2005,entitled “A non-local algorithm for image denoising” to Antoni Buades etal. and to the ICIP2007, entitled “Image denoising based on adapteddictionary computation” to Noura Azzabou et al.

In view of the above, the present invention provides an image denoisingmethod that can dynamically adjust the denoising strength, size ofsearch blocks and size of comparison blocks according to the complexityof image so as to conserve much more image details and eliminate theside effect occurred in the conventional methods.

SUMMARY OF THE INVENTION

The present invention provides an image denoising method that candynamically adjust the size of search blocks and size of comparisonblocks according to the complexity of the image around the currentpixel. In addition, the method of present invention can conserve muchmore image details.

It is one object of the present invention to provide an image denoisingmethod that is suitable for the transformations of various frequencies.

It is another object of the present invention to provide an imagedenoising method that can dynamically adjust the denoising strength ofthe pixels according to the complexity of image.

The present invention provides an image denoising method, comprising thesteps of: sequentially selecting a pixel in an image as a current pixel,wherein the pixels around the current pixel are defined as neighborhoodpixels; dynamically determining a current search block enclosing thecurrent pixel and a strength parameter and determining a comparisonblock for each of the pixels in the current search block, wherein thecomparison block encloses the each pixel; transforming the comparisonblock for each of the pixels in the current search block to a frequencydomain to form a frequency-domain comparison block; determining acurrent frequency basis for the frequency-domain comparison blocks;obtaining a similarity between each of the neighborhood pixels and thecurrent pixel in the current search block according to the currentfrequency basis; determining a weighting for each of the neighborhoodpixels related to the current pixel according to the strength parameter,the similarity and a distance between each of neighborhood pixels andthe current pixel in the current search block; and weighted averagingeach of the neighborhood pixels and the current pixel in the currentsearch block according to the weighting to obtain a reconstruction valueof the current pixel.

According to the image denoising method of the present invention,wherein one embodiment of dynamically determining a current search blockenclosing the current pixel and a strength parameter comprises:determining a maximal search block enclosing the current pixel and acomparison block for each of the pixels in the maximal search block,wherein the comparison block encloses the each pixel; calculating aconcentration degree of frequency parameter for the maximal searchblock; and determining the current search block and the strengthparameter according to the concentration degree of frequency parameter.

According to the image denoising method of the present invention,wherein one embodiment of calculating a concentration degree offrequency parameter for the maximal search block comprises: transformingthe comparison blocks for all the pixels in the maximal search block tofrequency domain to form frequency-domain comparison blocks; adding up apredetermined number of largest energy sums of different frequencies forthe predetermined number of frequencies, and then dividing the addedenergy sums by the total sum of the energy sums for all the frequenciesto obtain a quotient of energy sum; and comparing the quotient of energysum with a threshold value to determine the concentration degree offrequency parameter.

The present invention further provides an image denoising method,comprising the steps of: sequentially selecting a pixel in an image as acurrent pixel, wherein the pixels around the current pixel are definedas neighborhood pixels; determining a maximal search block enclosing thecurrent pixel and a comparison block for each of the pixels in themaximal search block, wherein the comparison block encloses the eachpixel; transforming the comparison blocks for all the pixels in themaximal search block to frequency domain to form frequency-domaincomparison blocks; calculating a ratio of edge pixels in the maximalsearch block; determining a current search block and a strengthparameter according to the ratio of the edge pixels and determining acurrent frequency basis for the current search block; obtaining asimilarity between each of the neighborhood pixels and the current pixelin the current search block according to the current frequency basis;determining a weighting for each of the neighborhood pixels related tothe current pixel according to the strength parameter, the similarityand a distance between each of neighborhood pixels and the current pixelin the current search block; and weighted averaging each of theneighborhood pixels and the current pixel in the current search blockaccording to the weighting to obtain a reconstruction value of thecurrent pixel.

According to the image denoising method of the present invention,wherein the step of calculating a ratio of edge pixels in the maximalsearch block comprises: adding up a predetermined number of largestenergy sums of different frequencies for the predetermined number offrequencies, and then dividing the added energy sums by the total sum ofthe energy sums for all the frequencies to obtain a quotient of energysum; and comparing the quotient of energy sum with a threshold value todetermine the ratio of the edge pixels

According to the image denoising method of the present invention,wherein the similarity is equal to the sum of the absolute values of thedifferences between the energy of the each neighborhood pixel and theenergy of the current pixel for each of the frequencies in the currentfrequency basis, or to the sum of the squares of the differences betweenthe energy of the each neighborhood pixel and the energy of the currentpixel for each of the frequencies in the current frequency basis.

According to the image denoising method of the present invention,wherein the current frequency basis are the frequencies for which thecorresponding energy sums of the frequency-domain comparison blocks withthe same frequency are largest for a predetermined number.

According to the image denoising method of the present invention,wherein the step of transforming the comparison block to the frequencydomain is performed by discrete cosine transform, Fourier transform,wavelet transform or principle components analysis. The method of thepresent invention can determine a denoising strength, a size of searchblocks and a size of comparison blocks according to the concentrationdegree of frequency parameter.

The foregoing, as well as additional objects, features and advantages ofthe invention will be more readily apparent from the following detaileddescription, which proceeds with reference to the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a noisy image and a denoised image reconstructed fromthe noisy image

FIG. 2 is a schematic view of a conventional neighborhood filtering.

FIG. 3 is a schematic view of a conventional non-local algorithm.

FIG. 4 a is a flow chart of the image denoising method according to oneembodiment of the present invention.

FIG. 4 b is a flow chart of the step of determining a current searchblock and a strength parameter in FIG. 4 a.

FIG. 4 c is a flow chart of the step of calculating a concentrationdegree of frequency parameter in FIG. 4 b.

FIG. 5 is a schematic view of the image denoising method according tothe present invention.

FIG. 6 is a schematic view illustrating the frequencies contained in thefrequency-domain comparison block according to the image denoisingmethod of the present invention.

FIG. 7 a is a flow chart of the image denoising method according toanother embodiment of the present invention.

FIG. 7 b is a flow chart of the step of determining a ratio of the edgepixels in FIG. 7 a.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

The foregoing, as well as additional objects, features and advantages ofthe invention will be more readily apparent from the following detaileddescription, which proceeds with reference to the accompanying drawings.In this invention, identical reference numerals will be used whendesignating substantially identical elements that are common to thefigures.

Referring to FIG. 4 a, it illustrates the image denoising methodaccording to one embodiment of the present invention. First, a pixel inan image is sequentially selected as a current pixel, wherein the pixelsaround the current pixel are defined as neighborhood pixels (step S₁). Acurrent search block enclosing the current pixel and a strengthparameter are then dynamically determined. In addition, a comparisonblock for each of the pixels in the current search block is determined,wherein the comparison block encloses the each pixel (step S₂).Afterward, the comparison block for each of the pixels in the currentsearch block is transformed to a frequency domain to form afrequency-domain comparison block (step S₃). A current frequency basisfor the frequency-domain comparison blocks is determined (step S₄). Asimilarity between each of the neighborhood pixels and the current pixelin the current search block is obtained according to the currentfrequency basis (step S₅). A weighting for each the neighborhood pixelrelated to the current pixel is determined according to the strengthparameter, the similarity and a distance between each of theneighborhood pixels and the current pixel in the current search block(step S₆). Subsequently, a reconstruction value for the current pixel isobtained by weighted averaging each the neighborhood pixel and thecurrent pixel in the current search block according to the weighting(step S₇). Finally, whether the reconstruction values for all the pixelsin the image have been obtained is determined (step S₈). If yes, thereconstruction for the image is completed. If not, the procedure will goback to step S₁.

Referring to FIG. 4 b, it illustrates one embodiment for the step ofdynamically determining a current search block and a strength parameterin the step S₂. A maximal search block enclosing the current pixel isdetermined and a comparison block for each of the pixels in the maximalsearch block is determined, wherein the comparison block encloses theeach pixel (step S₂₁). A concentration degree of frequency parameter forthe maximal search block is calculated (step S₂₂). The current searchblock and the strength parameter is determined according to theconcentration degree of frequency parameter (step S₂₃).

Referring to FIG. 4 c, it illustrates one embodiment for the step ofcalculating the concentration degree of frequency parameter in the stepS₂₂. The comparison blocks for all the pixels in the maximal searchblock are transformed to frequency domain to form frequency-domaincomparison blocks (step S₂₂₁). A predetermined number of largest energysums of different frequencies for the predetermined number offrequencies are added up. The added energy sums divides by the total sumof the energy sums for all the frequencies to obtain a quotient ofenergy sum (step S₂₂₂). The quotient of the energy sum is compared witha threshold value so as to determine the concentration degree offrequency parameter (step S₂₂₃).

Afterward, the image denoising method according to the present inventionwill be described in detail in the following paragraphs. The imagedenoising method of the present invention is used to reconstruct a noisyimage to be a denoised image, as shown in FIG. 1. It will be understoodthat the above steps for image reconstruction can be carried out througha processing unit. The processing unit is coupled to a storing unit toaccess the information arisen in the course of image reconstruction.

Referring to FIG. 5, a noisy image I includes a plurality of pixels Parranged in a matrix and each of the pixels P has a gray level. The sizeof the noisy image I can be determined by application. The imagedenoising method of the present invention is to obtain reconstructedgray levels for all the pixels in the noisy image I and then to form adenoised image according to the reconstructed gray levels.

Referring to FIGS. 4 a and 5 again, the image denoising method of thepresent invention can first calculate the reconstructed gray level for afirst pixel in one of the corners of the noisy image I and thensequentially obtain the reconstructed gray levels for the other pixelsin the noisy image I. According to the present invention, a pixel isprocessed now is named as a current pixel Pc and the pixels around thecurrent pixel Pc are defined as neighborhood pixels related to thecurrent pixel Pc, which can called as P₁₁, P₁₂, . . . , P₇₇ (stepS_(i)).

Afterward, a current search block Sc enclosing the current pixel Pc anda strength parameter are dynamically determined (step S₂). In thepresent invention, the size of the current search block Sc isdynamically determined according to the complexity of the image aroundthe current pixel Pc. The higher the complexity is, the smaller the sizeof the current search block Sc is. The lower the complexity is, thelarger the size of the current search block Sc is. According to thepresent invention, the performance for image denoising can be enhancedby selecting different sizes of the current search blocks Sc. Thestrength parameter is used for the subsequent steps and configured todetermine the image denoising strength (described in the followingparagraphs). In the step S₂, a comparison block B for each of the pixelsP in the current search block Sc is simultaneously determined, whereinthe comparison block B encloses the each pixel P. For example, thecomparison block B_(p11) is for the pixel P₁₁ and the comparison blockB_(p77) is for the pixel P₇₇. These comparison blocks B_(p11)-B_(p77)has a size of 5×5. Therefore, when a current search block Sc has a sizeof 7×7, it includes 49 pixels P₁₁-P₇₇ and Pc, and the comparison blocksB_(p11)-B_(p77) and Bpc enclosing these pixels are then determined. Itwill be understood that the sizes of the current search block Sc andcomparison blocks B are not limited to the above description.

Referring to FIGS. 4 b and 5 again, one embodiment for determining thesize of the current search block Sc and the strength of the strengthparameter will be described in the following paragraphs. When a currentpixel Pc is selected (step S₁), a maximal search block Sc_max enclosingthe current pixel Pc is first determined. The size of the maximal searchblock Sc_max is, for example, 7×7 (step S₂₁). A comparison block foreach of the pixels in the maximal search block Sc_max is also determinedand has a size of, for example, 5×5. For example, a comparison blockB_(p11) enclosing the pixel P₁₁ is determined and a comparison block Bpcenclosing the current pixel Pc. Afterward, the comparison blocks for allthe pixels in the maximal search block Sc_max are transformed tofrequency domain to form frequency-domain comparison blocks. Forexample, the comparison block B_(p11) is transformed to the comparisonblock B_(p11′) and the comparison block Bpc is transformed to thecomparison block Bpc′. Similarly, the remaining 47 comparison blocksassociated to the maximal search block Sc_max are also transformed tofrequency-domain comparison blocks. The method for transforming to thefrequency domain can be discrete cosine transform, Fourier transform,wavelet transform or principle components analysis.

Afterward, a concentration degree of frequency parameter for the maximalsearch block is calculated (step S₂₂) and the embodiment thereof will bedescribed in the following paragraphs. In the present invention, theconcentration degree of frequency parameter for the maximal search blockis equivalent to the ratio of the edge pixels in the maximal searchblock Sc_max. The way to identify whether a pixel in the maximal searchblock is an edge pixel is described as follows: When the comparisonblock for the pixel is transformed to a frequency-domain comparisonblock, the pixel will be an edge pixel if the frequency-domaincomparison block has energy concentrated within some particularfrequencies. In contrast, the pixel will not be an edge pixel if theenergy of the frequency-domain comparison block uniformly falls withinall frequencies. Therefore, the higher the concentration degree offrequency parameter for the maximal search block is, the more edgepixels the maximal search block has. Afterward, the size of the currentsearch block Sc and the strength of the strength parameter aredetermined according to the concentration degree of frequency parameter(step S₂₃). For example, when the concentration degree of frequencyparameter (or the ratio of the edge pixels) is higher, it means that theimage in the maximal search block Sc_max is more complex. Therefore, itis required to select a smaller current search block Sc and a weakerstrength parameter. In contrast, when the concentration degree offrequency parameter (or the ratio of the edge pixels) is lower, it meansthat the change of the image in the maximal search block Sc_max is moreuniform. It is therefore required to select a larger current searchblock Sc and a stronger strength parameter. In the present invention,the current search block Sc can have a size of 7×7, 5'5 or 3×3 accordingto the concentration degree of frequency parameter. However, the size ofthe current search block Sc is not limited to the above description. Thespirit of the present invention is to determine the size of the currentsearch block Sc and the strength of the strength parameter according tothe complexity of the image around the current pixel Pc.

Referring to FIGS. 4 c to 6, one embodiment for determining theconcentration degree of frequency parameter will be described in thefollowing paragraphs. In the following paragraphs, the maximal searchblock Sc_max is specified to have a size of 7×7 and the comparison blockfor each the pixel is specified to have a size of 5×5. When a certaincomparison block is transformed to a frequency-domain comparison block,it comprises 25 frequencies. For example, the comparison block B_(p11)of the pixel P₁₁ is transformed to the frequency-domain comparison blockB_(p11′). The frequency-domain comparison block B_(p11′) comprises 25frequencies. For example, the 25 frequencies can be numbered fromfrequency 1 to frequency 25. These 25 frequencies have energies E₁¹¹-E₂₅ ¹¹ respectively. The frequency-domain comparison block Bpc′ ofthe current pixel Pc comprises the energies E₁ ^(pc)-E₂₅ ^(pc) of 25frequencies and the frequency-domain comparison block B_(p77′) comprisesthe energies E₁ ⁷⁷-E₂₅ ⁷⁷ of 25 frequencies. In order to facilitate thedescription of the invention, each of the frequency-domain comparisonblocks is shown as a 25-dimension array in FIG. 6, wherein the subscriptof the energy E denotes the frequency number and the superscript denotesthe pixel number (step S₂₂₁).

The energies with the same frequencies for the frequency-domaincomparison blocks Bp11′-Bp77′ is added up to obtain the energy sums E₁^(sum)-E₂₅ ^(sum) for different frequencies. For example, the energy sumfor frequency 1 is E₁ ^(sum)=E₁ ¹¹+ . . . +E₁ ⁷⁷, . . . , and the energysum for frequency 25 is E₂₅ ^(sum)=E₂₅ ¹¹+ . . . +E₂₅ ⁷⁷. Afterward, fora predetermined number of frequencies, the predetermined number oflargest energy sums of different frequencies is added up and defined asE_(max) ^(sum). The total sum of the energy sums for all frequencies canbe defined as E_(total) ^(sum). A quotient of energy sum is thenobtained by dividing the above sum of the energy sums by the total sumof the energy sums for all the frequencies, i.e. E_(max)^(sum)/E_(total) ^(sum) (step S₂₂₂). For example, the predeterminednumber is five and the largest five energy sums of different frequenciesare E₁ ^(sum), E₃ ^(sum), E₅ ^(sum), E₇ ^(sum) and E₉ ^(sum). Thequotient of energy sum can then be expressed as:

$\left( {E_{1}^{sum} + E_{3}^{sum} + E_{5}^{sum} + E_{7}^{sum} + E_{9}^{sum}} \right)/{\sum\limits_{i = 1}^{25}E_{i}^{sum}}$

Subsequently, the quotient of energy sum is compared with apredetermined threshold value. The concentration degree of frequencyparameter is then determined according to the relation between thequotient of energy sum and the predetermined threshold value (stepS₂₂₃). For example, when the quotient of energy sum is greater than apredetermined threshold value, it means that the image in the maximalsearch block Sc_max is more complex. In contrast, when the quotient ofenergy sum is smaller than a predetermined threshold value, it meansthat the change of the image in the maximal search block Sc_max is moreuniform. It should be understood that the concentration degree offrequency parameter is not limited to the above description, othermethods, such as statistics can also be used to calculate thedistribution of the energy over frequency. In addition, it will be notedthat the comparison blocks for the pixels in the current search blockcan also be dynamically determined according to the concentration degreeof frequency parameter (the ratio of the edge pixels).

When the step S₂ is completed, a current search block Sc and a strengthparameter can be dynamically determined according to the complexity ofthe image around the current pixel Pc. Afterward, the comparison blockfor each of the pixels in the current search block Sc is transformed toa frequency domain to form a frequency-domain comparison block (stepS₃). The method for transforming to the frequency domain can be discretecosine transform, Fourier transform, wavelet transform or principlecomponents analysis. It should be understood that if the comparisonblocks for the pixels in the maximal search block Sc_max have beentransformed to frequency domain, these frequency-domain comparisonblocks can be stored in a storing unit. Since the current search blockSc is smaller than or equal to the maximal search block Sc_max, thefrequency-domain comparison blocks associated with the pixels in thecurrent search block Sc can be directly accessed from the storing unitin the step S₃. There is no need to transform to frequency domain again.

Referring to FIGS. 4 a, 5 and 6 again, when the comparison blocks forthe pixels in a current search block Sc, such as a 7×7 search block, aretransformed to frequency domain, such as 5×5 frequency-domain comparisonblocks, a current frequency basis for the frequency-domain comparisonblocks associated with the current search block Sc is then determinedfor use in the subsequent steps. Referring to FIG. 6 again, in thepresent invention, the current frequency basis is determined accordingto the frequencies of the predetermined number of largest energy sums inthe total sum of the energy sums for all frequencies. This is becausewhen the energy sum for a certain frequency is large, most of the imageinformation in the current search block will fall within this frequency.For example, when the largest ten energy sums are E₁₀ ^(sum)-E₁₉ ^(sum),the frequency 10 to frequency 19 (total 10 frequencies) will be thecurrent frequency basis (step S₄).

Afterward, a similarity between each the neighborhood pixel and thecurrent pixel in the current search block is obtained according to thecurrent frequency basis (step S₅). To obtain the similarity between agiven neighborhood pixel and the current pixel in the current searchblock, the similarity is equal to the sum of the absolute values of thedifferences between the energy of the given neighborhood pixel and theenergy of the current pixel for each of the frequencies in the currentfrequency basis. The similarity can also be equal to the sum of thesquares of the differences between the energy of the given neighborhoodpixel and the energy of the current pixel for each of the frequencies inthe current frequency basis. Therefore, when the sum of the absolutevalues of the differences or the sum of the squares of the differencesis small, the similarity between a neighborhood pixel and the currentpixel will be large. In contrast, when the sum of the absolute values ofthe differences or the sum of the squares of the differences is large,the similarity between a neighborhood pixel and the current pixel willbe small. For example, the similarity between the pixel P₁₁ and thecurrent pixel Pc can be expressed as:

(|E₁₀ ¹¹−E₁₀ ^(pc)|+|E₁₁ ¹¹−E₁₁ ^(pc)|+ . . . +|E₁₉ ¹¹−E₁₉ ^(pc)|)

or

[(E₁₀ ¹¹−E₁₀ ^(pc))²+(E₁₁ ¹¹−E₁₁ ^(pc))²+ . . . +(E₁₉ ¹¹−E₁₉ ^(pc))²]

It should be understood that the method for calculating the similaritybetween a neighborhood pixel and the current pixel is not limited to theabove description. The energy relation for frequency between thefrequency-domain comparison block of a neighborhood pixel and thefrequency-domain comparison block Bpc′ can be expressed in othermethods. In this embodiment, similarities between 48 neighborhood pixelsand the current pixel Pc can be obtained. As known, the similaritybetween the current pixel Pc and the current pixel Pc will be 100%.

Therefore, a weighting for each of the neighborhood pixels P₁₁-P₇₇related to the current pixel Pc is determined according to the strengthparameter, and a distance and the similarity between each of theneighborhood pixels P₁₁-P₇₇ and the current pixel Pc in the currentsearch block (step S₆). When a neighborhood pixel is farther from thecurrent pixel Pc, the weighting for the neighborhood pixel is lowered.In contrast, when a neighborhood pixel is closer to the current pixelPc, the weighting for the neighborhood pixel is increased. When thesimilarity between a neighborhood pixel and the current pixel Pc islower, the weighting for the neighborhood pixel is lowered. In contrast,when the similarity between a neighborhood pixel and the current pixelPc is higher, the weighting for the neighborhood pixel is increased.When a weighting rate for each of the neighborhood pixels P₁₁-P₇₇ in thecurrent search block Sc is determined according to the distance andsimilarity between each the neighborhood pixel and the current pixel Pc,a weighting for each of the neighborhood pixels P₁₁-P₇₇ related to thecurrent pixel Pc is determined according to the strength parameter. Whenthe image in the current search block Sc is complex, a low strengthparameter is selected so as to lower the denoising strength. If thechange of the image in the current search block Sc is uniform, a highstrength parameter is selected to increase the denoising strength. Thestrength parameter adjusts the weighting rate according to thecomplexity of the image in the current search block Sc. Therefore, thestrength parameter can be a mathematical function (ratio, power, logfunction or other functions) or a numeric value. For example, thestrength parameter can be that the weighting rate multiplies by a ratio,the weighting rate to the power, the logarithm of the weighting rate orthat the weighting rate adds a certain value.

When a weighting for each of the neighborhood pixels P₁₁-P₇₇ related tothe current pixel Pc in the current search block Sc is obtained, thecurrent pixel Pc and each of the neighborhood pixels P₁₁-P₇₇ is weightedaveraged, e.g. by formula (2) to obtain a reconstruction value thecurrent pixel Pc (step S₇) according to the weighting.

Afterward, whether the reconstruction values for all the pixels in thenoisy image I have been obtained is determined (step S₈). When thereconstruction values for all the pixels have been obtained, the noisyimage I is reconstructed and a denoised image is generated. If thereconstruction values for the pixels have not been all obtained, theprocedure will go back to step S₁. A next pixel P in the image I will bereconstructed.

Referring to FIG. 7 a, it illustrates the image denoising methodaccording to another embodiment of the present invention. First, a pixelin an image is sequentially selected as a current pixel, wherein thepixels around the current pixel are defined as neighborhood pixels (stepS₁). A maximal search block enclosing the current pixel is determinedand a comparison block for each of the pixels in the maximal searchblock is determined, wherein the comparison block encloses the eachpixel (step S₂₁). The comparison blocks for all the pixels in themaximal search block are transformed to frequency domain to formfrequency-domain comparison blocks (step S₂₂₁). A ratio of the edgepixels in the maximal search block is calculated (step A₁). A currentsearch block and a strength parameter are determined according to theratio of the edge pixels and a current frequency basis for the currentsearch block is determined (step A₂). A similarity between each of theneighborhood pixels and the current pixel in the current search block isobtained according to the current frequency basis (step S₅). A weightingfor each the neighborhood pixel related to the current pixel isdetermined according to the strength parameter, and a distance and thesimilarity between each the neighborhood pixel and the current pixel inthe current search block (step S₆). Subsequently, a reconstruction valuefor the current pixel is obtained by weighted averaging each theneighborhood pixel and the current pixel in the current search blockaccording to the weighting (step S₇). Finally, whether thereconstruction values for all the pixels in the image have been obtainedis determined (step S₈). If yes, the reconstruction for the image iscompleted (step S₉). If not, the procedure will go back to step S₁. Inthis embodiment, identical reference numerals have been used whendesignating identical steps that are common to FIGS. 4 a-4 c. Inaddition, as described above, the ratio of the edge pixels in themaximal search block is equivalent to the concentration degree offrequency parameter. Therefore, the step A₁ in FIG. 7 a is similar tothe step S₂₂ in FIG. 4 b and the step A₂ is similar to the steps A₂₃ andS₄. This embodiment is substantially the same as the embodimentdisclosed in FIGS. 4 a-4 c and the difference between them is only inthe sequence of the steps. Thus, any further illustrations of thisembodiment are omitted herein.

In addition, referring to FIGS. 7 a and 7 b, the step A₁ of calculatinga ratio of the edge pixels in the maximal search block comprises thefollowing steps. A quotient of energy sum is obtained by dividing thesum of the predetermined number of largest energy sums of differentfrequencies by the total sum of the energy sums for all the frequencies(step S₂₂₂). The quotient of energy sum is compared to a threshold valueso as to determine the ratio of the edge pixels (step A₃). Since theratio of the edge pixels in the maximal search block is equivalent tothe concentration degree of frequency parameter, the step A₃ in FIG. 8 bis similar to the step S₂₂₃ in FIG. 4 c.

It will be noted that although the above blocks, including currentsearch block, maximal search block, frequent-domain comparison block,search block and comparison block, are square disclosed in theembodiments, they can have any shape, such as rectangle, rhombus, circleor ellipse.

As described above, since the conventional image reconstruction methodsfail to dynamically adjust parameters according to the characteristicsof the pixels. This leads to poor result of details. The presentinvention provides an image denoising method that can dynamically adjustthe denoising strength, size of search blocks and size of comparisonblocks according to the complexity of image, as shown in FIGS. 4 a-4 cand 7 a-7 b. The method of present invention can conserve much moreimage details and eliminate the side effect occurred in the conventionalmethods.

Although the preferred embodiments of the invention have been disclosedfor illustrative purposes, those skilled in the art will appreciate thatvarious modifications, additions and substitutions are possible, withoutdeparting from the scope and spirit of the invention as disclosed in theaccompanying claims.

1. An image denoising method, comprising the steps of: sequentiallyselecting a pixel in an image as a current pixel, wherein the pixelsaround the current pixel are defined as neighborhood pixels; dynamicallydetermining a current search block enclosing the current pixel and astrength parameter and determining a comparison block for each of thepixels in the current search block, wherein the comparison blockencloses the each pixel; transforming the comparison block for each ofthe pixels in the current search block to a frequency domain to form afrequency-domain comparison block; determining a current frequency basisfor the frequency-domain comparison blocks; obtaining a similaritybetween each of the neighborhood pixels and the current pixel in thecurrent search block according to the current frequency basis;determining a weighting for each of the neighborhood pixels related tothe current pixel according to the strength parameter, the similarityand a distance between each of neighborhood pixels and the current pixelin the current search block; and weighted averaging each of theneighborhood pixels and the current pixel in the current search blockaccording to the weighting to obtain a reconstruction value of thecurrent pixel.
 2. The image denoising method as claimed in claim 1,further comprising: determining whether the reconstruction values forall the pixels in the image have be obtained.
 3. The image denoisingmethod as claimed in claim 1, wherein the step of transforming thecomparison block to the frequency domain is performed by discrete cosinetransform, Fourier transform, wavelet transform or principle componentsanalysis.
 4. The image denoising method as claimed in claim 1, whereinthe current frequency basis are the frequencies for which thecorresponding energy sums of the frequency-domain comparison blocks withthe same frequency are largest for a predetermined number.
 5. The imagedenoising method as claimed in claim 1, wherein the similarity is equalto the sum of the absolute values of the differences between the energyof the each neighborhood pixel and the energy of the current pixel foreach of the frequencies in the current frequency basis, or to the sum ofthe squares of the differences between the energy of the eachneighborhood pixel and the energy of the current pixel for each of thefrequencies in the current frequency basis.
 6. The image denoisingmethod as claimed in claim 1, wherein the step of dynamicallydetermining a current search block enclosing the current pixel and astrength parameter comprises: determining a maximal search blockenclosing the current pixel and a comparison block for each of thepixels in the maximal search block, wherein the comparison blockencloses the each pixel; calculating a concentration degree of frequencyparameter for the maximal search block; and determining the currentsearch block and the strength parameter according to the concentrationdegree of frequency parameter.
 7. The image denoising method as claimedin claim 6, wherein the step of calculating a concentration degree offrequency parameter for the maximal search block comprises: transformingthe comparison blocks for all the pixels in the maximal search block tofrequency domain to form frequency-domain comparison blocks; adding up apredetermined number of largest energy sums of different frequencies forthe predetermined number of frequencies, and then dividing the addedenergy sums by the total sum of the energy sums for all the frequenciesto obtain a quotient of energy sum; and comparing the quotient of energysum with a threshold value to determine the concentration degree offrequency parameter.
 8. The image denoising method as claimed in claim7, wherein the step of transforming the comparison blocks for all thepixels in the maximal search block to frequency domain is performed bydiscrete cosine transform, Fourier transform, wavelet transform orprinciple components analysis.
 9. The image denoising method as claimedin claim 6, wherein the maximal search block has a 7×7 size.
 10. Theimage denoising method as claimed in claim 6, wherein when theconcentration degree of frequency parameter is higher, the strengthparameter and the current search block are smaller, and when theconcentration degree of frequency parameter is lower, the strengthparameter and the current search block are larger.
 11. The imagedenoising method as claimed in claim 10, wherein the size of the currentsearch block is one of the 7×7, 5×5 and 3×3 according to theconcentration degree of frequency parameter.
 12. The image denoisingmethod as claimed in claim 1, wherein the current search block,comparison block and frequency-domain comparison block have a shape ofsquare, rectangle, rhombus, circle or ellipse.
 13. An image denoisingmethod, comprising the steps of: sequentially selecting a pixel in animage as a current pixel, wherein the pixels around the current pixelare defined as neighborhood pixels; determining a maximal search blockenclosing the current pixel and a comparison block for each of thepixels in the maximal search block, wherein the comparison blockencloses the each pixel; transforming the comparison blocks for all thepixels in the maximal search block to frequency domain to formfrequency-domain comparison blocks; calculating a ratio of edge pixelsin the maximal search block; determining a current search block and astrength parameter according to the ratio of the edge pixels anddetermining a current frequency basis for the current search block;obtaining a similarity between each of the neighborhood pixels and thecurrent pixel in the current search block according to the currentfrequency basis; determining a weighting for each of the neighborhoodpixels related to the current pixel according to the strength parameter,the similarity and a distance between each of neighborhood pixels andthe current pixel in the current search block; and weighted averagingeach of the neighborhood pixels and the current pixel in the currentsearch block according to the weighting to obtain a reconstruction valueof the current pixel.
 14. The image denoising method as claimed in claim13, wherein the step of transforming the comparison blocks for all thepixels in the maximal search block to frequency domain is performed bydiscrete cosine transform, Fourier transform, wavelet transform orprinciple components analysis.
 15. The image denoising method as claimedin claim 13, wherein the step of calculating a ratio of edge pixels inthe maximal search block comprises: adding up a predetermined number oflargest energy sums of different frequencies for the predeterminednumber of frequencies, and then dividing the added energy sums by thetotal sum of the energy sums for all the frequencies to obtain aquotient of energy sum; and comparing the quotient of energy sum with athreshold value to determine the ratio of the edge pixels
 16. The imagedenoising method as claimed in claim 13, wherein when the ratio of theedge pixels is higher, the strength parameter and the current searchblock are smaller, and when the ratio of the edge pixels is lower, thestrength parameter and the current search block are larger.
 17. Theimage denoising method as claimed in claim 16, wherein the size of thecurrent search block is one of the 7×7, 5×5 and 3×3 according to theratio of the edge pixels.
 18. The image denoising method as claimed inclaim 13, wherein the current frequency basis are the frequencies forwhich the corresponding energy sums of the frequency-domain comparisonblocks with the same frequency are largest for a predetermined number.19. The image denoising method as claimed in claim 13, wherein thesimilarity is equal to the sum of the absolute values of the differencesbetween the energy of the each neighborhood pixel and the energy of thecurrent pixel for each of the frequencies in the current frequencybasis, or to the sum of the squares of the differences between theenergy of the each neighborhood pixel and the energy of the currentpixel for each of the frequencies in the current frequency basis. 20.The image denoising method as claimed in claim 13, further comprising:determining whether the reconstruction values for all the pixels in theimage have be obtained.
 21. The image denoising method as claimed inclaim 13, wherein the maximal search block, comparison block,frequency-domain comparison block and current search block have a shapeof square, rectangle, rhombus, circle or ellipse.
 22. The imagedenoising method as claimed in claim 13, wherein the strength parameteris a mathematical function or a numeric value.